#pragma once

#include "staticimage.hpp"

class ScrollImage
{
public:
	ScrollImage();
	~ScrollImage();

	bool Load( const std::string& str );
	void Stretch( float width, float height );
	void Render(float x, float y) const;
	void ScreenPosition( float x, float y ) { xStart = x; yStart = y; }
	void BasePosition( float x, float y ) { idealX = x; idealY = y; }
	void XScroll( float x ) {xScroll=x;}
	void YScroll( float y ) {yScroll=y;}
	void RepeatX( bool tf ) { repeatX = tf; }
	void RepeatY( bool tf ) { repeatY = tf; }
	void TopLimit( float t ) { limitTop=true; top=t; }
	void BottomLimit( float b ) { limitBottom=true; bottom=b; }
	void RightLimit( float r ) { limitLeft=true; right=r; }
	void LeftLimit( float l ) { limitBottom=true; left=l; }
	float Width() const { return image.Width(); }
	float Height() const { return image.Height(); }
	//void UpdateX( float screenMoved );
	//void UpdateY( float screenMoved );

private:
	KEG::StaticImage image;
	float xStart, yStart;
	float idealX, idealY;
	float xScroll, yScroll;
	bool repeatX, repeatY;
	bool limitTop, limitBottom, limitLeft, limitRight;
	float top, bottom, left, right;
};
